{extend name="public/layout" /}
{block name="head"}{/block}
{block name="body"}

<body>
  <div class="container-fluid p-t-15">
    <div class="card">
      <div class="card-body">
        <form class="form-horizontal" id="form" data-call="refreshPage">
          <div class="form-group">
            <label class="col-sm-2 control-label">上级分类</label>
            <div class="col-sm-10">
              {:\\helper\\Form::_select('pid',$info.pid,[
              "empty-option"=>"0|==顶级分类==",
              "items-data"=>$class,
              "items-key"=>"id",
              "items-name"=>"name"
              ])}
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">分类编码</label>
            <div class="col-sm-10">
              {:\\helper\\Form::_text('code',$info.code,[
              "datatype"=>"*"
              ])}
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">分类名称</label>
            <div class="col-sm-10">
              {:\\helper\\Form::_text('name',$info.name,[
              "datatype"=>"*"
              ])}
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">排序</label>
            <div class="col-sm-10">
              {:\\helper\\Form::_number('show_order',$info.show_order,[
              "datatype"=>"n"
              ])}
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-10 col-sm-offset-2">
              <div class="pull-left">
                <button type="button" class="btn btn-primary btn-sub">保存</button>
                <button type="button" class="btn btn-default btn-reset">重置</button>
              </div>
              <div class="pull-left m-l-15">
                <p class="error-msg"></p>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  <script>
    formHelper.init();
    formHelper.subForm(function () {
      parent.doAction.initTree();
    });
  </script>
</body>
{/block}